<a class="button float" href="report/user.html" target="navTab" rel="report/user" data-change-title="false"><i class="icon-refresh"></i><@t.page 'button.refresh'/></a>
<div class="pageFormContent" layoutH>
    <fieldset>
        <legend><@t.page 'report.user'/></legend>
        <div class="unit clearfix">
            <div id="register" class="chart box w"  data-resize-object="registerChart"></div>
            <div class="box w">
                <div class="pageFormContent">
                    <@sys.userList pageSize=10>
                        <#list page.list as user>
                    <p class="ellipsis">
                        <span class="float-right info">${user.registeredDate}</span>
                        ${user.nickname}
                    </p>
                        </#list>
                    </@sys.userList>
                </div>
            </div>
            <div id="login" class="chart box w"  data-resize-object="loginChart"></div>
            <div class="box w">
                <div class="pageFormContent">
                    <@log.loginList pageSize=10>
                        <#list page.list as a>
                    <p class="ellipsis">
                        <span class="float-right info">${a.createDate}</span>
                        ${(a.name)!}
                        <span class="statusText ${a.result?then('green','red')}">${t.pageMessage(a.result?then('success','fail'))}</span>
                    </p>
                        </#list>
                    </@log.loginList>
                </div>
            </div>
            <div id="operate" class="chart box w" data-resize-object="operateChart"></div>
            <div class="box w">
                <div class="pageFormContent">
                    <@log.operateList pageSize=10>
                        <#list page.list as a>
                            <@t.merge 'userIds' a.userId!/>
                        </#list>
                        <@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
                        <#list page.list as a>
                    <p class="ellipsis">
                        <span class="float-right info">${a.createDate}</span>
                        ${(userMap[a.userId?string].nickname)!} <@t.message 'operate.'+a.operate/>
                    </p>
                        </#list>
                    </@log.operateList>
                </div>
            </div>
            <div id="userComment" class="chart box w"data-resize-object="userCommentChart"></div>
            <div class="box w">
                <div class="pageFormContent">
                    <@cms.commentList advanced=true pageSize=10>
                        <#list page.list as a>
                            <@t.merge 'userIds' a.userId!/>
                        </#list>
                        <@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
                        <#list page.list as a>
                    <p class="ellipsis">
                        <span class="float-right info">${a.createDate}</span>
                        ${(userMap[a.userId?string].nickname)!} : ${(a.text)!}
                    </p>
                        </#list>
                    </@cms.commentList>
                </div>
            </div>
         </div>
    </fieldset>
</div>
<script>
registerChart=echarts.init(document.getElementById("register"));
registerChart.setOption({
    title: {
        text: "<@t.page 'register'/>",
        subtext: "<@t.page 'total'/>:<@sys.userList pageSize=0>${page.totalCount}</@sys.userList>",
        x:"center"
    },
    tooltip : {
        trigger: "axis"
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    grid: {
        left: "3%",
        right: "4%",
        bottom: "3%",
        containLabel: true
    },
    xAxis: {
        type: "category",
        boundaryGap: false,
        data: [<#list 30..0 as a>"${(.now?long-a*86400000)?number_to_date?string('MM-dd')}"<#sep>,</#list>]
    },
    yAxis: {
        type: "value"
    },
    series: [
    {
           name:"<@t.page 'register'/>",
           type:"line",
           smooth: true,
           data:[<#list 30..0 as a><@sys.userList startRegisteredDate=(.now?long-a*86400000)?number_to_date?string endRegisteredDate=(.now?long-(a-1)*86400000)?number_to_date?string>${page.totalCount}</@sys.userList><#sep>,</#list>],
           areaStyle: {}
       }]
});
loginChart=echarts.init(document.getElementById("login"));
loginChart.setOption({
    title: {
        text: "<@t.page 'login'/>",
        x:"center"
    },
    tooltip : {
        trigger: "axis"
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    grid: {
        left: "3%",
        right: "4%",
        bottom: "3%",
        containLabel: true
    },
    xAxis: {
        type: "category",
        boundaryGap: false,
        data: [<#list 30..0 as a>"${(.now?long-a*86400000)?number_to_date?string('MM-dd')}"<#sep>,</#list>]
    },
    yAxis: {
        type: "value"
    },
    series: [
    {
        name:"<@t.page 'login'/>",
        type:"line",
        smooth: true,
        data:[<#list 30..0 as a><@log.loginList startCreateDate=(.now?long-a*86400000)?number_to_date?string endCreateDate=(.now?long-(a-1)*86400000)?number_to_date?string>${page.totalCount}</@log.loginList><#sep>,</#list>],
        areaStyle: {}
    }]
});
operateChart=echarts.init(document.getElementById("operate"));
operateChart.setOption({
    title: {
        text: "<@t.page 'operate'/>",
        x:"center"
    },
    tooltip : {
        trigger: "axis"
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    grid: {
        left: "3%",
        right: "4%",
        bottom: "3%",
        containLabel: true
    },
    xAxis: {
        type: "category",
        boundaryGap: false,
        data: [<#list 30..0 as a>"${(.now?long-a*86400000)?number_to_date?string('MM-dd')}"<#sep>,</#list>]
    },
    yAxis: {
        type: "value"
    },
    series: [
    {
        name:"<@t.page 'operate'/>",
        type:"line",
        smooth: true,
        data:[<#list 30..0 as a><@log.operateList channel='web_manager' startCreateDate=(.now?long-a*86400000)?number_to_date?string endCreateDate=(.now?long-(a-1)*86400000)?number_to_date?string>${page.totalCount}</@log.operateList><#sep>,</#list>],
        areaStyle: {}
    }]
});
userCommentChart=echarts.init(document.getElementById("userComment"));
userCommentChart.setOption({
    title: {
        text: "<@t.page 'comment'/>",
        subtext: "<@t.page 'total'/>:<@cms.commentList pageSize=0>${page.totalCount}</@cms.commentList>",
        x:"center"
    },
    tooltip : {
        trigger: "axis"
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    grid: {
        left: "3%",
        right: "4%",
        bottom: "3%",
        containLabel: true
    },
    xAxis: {
        type: "category",
        boundaryGap: false,
        data: [<#list 30..0 as a>"${(.now?long-a*86400000)?number_to_date?string('MM-dd')}"<#sep>,</#list>]
    },
    yAxis: {
        type: "value"
    },
    series: [
    {
        name:"<@t.page 'operate'/>",
        type:"line",
        smooth: true,
        data:[<#list 30..0 as a><@log.operateList operate='save.cmsComment' startCreateDate=(.now?long-a*86400000)?number_to_date?string endCreateDate=(.now?long-(a-1)*86400000)?number_to_date?string>${page.totalCount}</@log.operateList><#sep>,</#list>],
        areaStyle: {}
    }]
});
</script>